<%@page import="com.sdry.model.llm.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>工位：膜丝</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/layui.css"  media="all">
	<link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/toastr.min.css"  media="all">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/assets/ztree/css/zTreeStyle/zTreeStyle.css">
	
	<script src="${pageContext.request.contextPath }/assets/layui.js" charset="utf-8"></script>
	<script src="${pageContext.request.contextPath }/assets/layui.all.js"></script>
	<script src="${pageContext.request.contextPath }/assets/js/jquery.min.js" charset="utf-8"></script>
	<script src="${pageContext.request.contextPath }/assets/js/toastr.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/assets/ztree/js/jquery.ztree.all.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/assets/ztree/js/jquery.ztree.core.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/assets/ztree/js/jquery.ztree.excheck.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/assets/ztree/js/jquery.ztree.exedit.js"></script>
    <%
		User people = (User) request.getSession().getAttribute("currentUser");
	    String name = null;
	    if(people != null){
	      name = people.getUserName();
	    }
	%>
    
    <style type="text/css">
    	.font1 {
    		font-family:微软雅黑;
    		font-size:40px;
    		line-height: 110px;
    		color: #ffffff;
    		font-weight:bold;
    	}
    	.font2 {
    		font-family:微软雅黑;
    		font-size:38px;
    		line-height: 80px;
    		color: #ffffff
    	}
    	.font3 {
    		font-family:微软雅黑;
    		font-size:38px;
    		line-height: 80px;
    	}
    	.font4 {
    		font-family: 微软雅黑; 
    		font-size: 38px;; 
    		line-height: 40px
    	}
    	/* 设置表头 */
		#table1 tr .headTd {
			background-color: #4472C4;
			color: #ffffff
		}
    	/* 设置表头 */
		tr .titleTd {
			/* background-color: #BDD7EE; */
			color: #4472c4;
			border: 1px solid black;
		}
		.oddrowcolor{
			background-color:#d4e3e5;
		}
		.evenrowcolor{
			background-color:#c3dde0;
    	}
    	#showTable td{
    		line-height:44px;
			border-width: 1px;
		    border-style: solid;
		    border-color: #e6e6e6;
		    font-size: 24px;
		    font-family: 微软雅黑
    	}
    </style>
</head>

<script type="text/javascript">
	//膜丝，产品，膜丝类型,组件尺寸对应关系数组
	var productArr = 
		[
			 ["01","PSH2-0960-T-01","热法","0960"]
			 ,["02","PSH2-0980-T-02","热法","0980"]
			 ,["03","PSH1-1060-B-03","湿法","1060"]
			 ,["04","PSH1-1080-C-04","湿法","1080"]
		];
	var firstId = 1;
	var currentId = firstId-1;
	var lastId = 15;
	var mmNumber = "m";
	//扫码框id
	var barCodeId = "barCode";

	var i1 = "i1"
	var i2 = "i2"
	var i1Id = "i1Id"

	//时间
	setInterval(function() {mytime()},1000);
	var format = "";
	//时分秒
	function mytime(){
		var d=new Date(format);
		var day=d.getDate();
		d.setSeconds(d.getSeconds()+1);
		format = d;
		var month=d.getMonth() + 1;
		var year=d.getFullYear();
		var weekday=new Array(7);
		weekday[0]="星期日";
		weekday[1]="星期一";
		weekday[2]="星期二";
		weekday[3]="星期三";
		weekday[4]="星期四";
		weekday[5]="星期五";
		weekday[6]="星期六";
		var b = d.toLocaleTimeString();
		document.getElementById('myTime').innerHTML = year + "年" + month + "月" + day+"日"+"&nbsp;<br>"+weekday[d.getDay()]+b;
	    //document.getElementById("time1").innerHTML = b;
	}
	//年月日+星期
	function load(){
		format = '${format}';
		var d=new Date(format);
		var day=d.getDate();
		var month=d.getMonth() + 1;
		var year=d.getFullYear();
		var weekday=new Array(7);
		weekday[0]="星期日";
		weekday[1]="星期一";
		weekday[2]="星期二";
		weekday[3]="星期三";
		weekday[4]="星期四";
		weekday[5]="星期五";
		weekday[6]="星期六";
		var b = d.toLocaleTimeString();
		document.getElementById('myTime').innerHTML = year + "年" + month + "月" + day+"日"+"&nbsp;<br>"+weekday[d.getDay()]+b;
	    //document.getElementById("time1").innerHTML = b;
	    
	}
	 
	 function add0(m){
	    	return m<10?'0'+m:m 
	 }
    
	 
	//初始化
	$(function() {
		//年月日+星期  排产单
		load();
		//查询排产单日期
		selectDaysheduTime()
		//选择扫码框
		$("#"+barCodeId).val("");
		$("#"+barCodeId).select();  
		
	    var product = $("#product").html();
		if(product == "" || product == undefined || product == null) {
	    	$("#product").html("&nbsp;");
			return;
		}else {
			//根据产品查询
	    	selectNum();
		}
	})
	 
	//查询排产单日期
    function selectDaysheduTime() {
    	$.ajax({
    		type:'post',
    		url:'/solid/selectDaysheduTime.do',
    		success:function(data){
    			$("#planTime").html(data);
    		}
    	});
    }
	//根据膜管类型查对应膜丝个数
	function selectnumByProduct(product) {
		var num = 0;
		//计划量
    	$.ajax({
	    	type:'post',
	    	async:false, 
	    	url:'${pageContext.request.contextPath }/others/findProductByPnum.do',
	    	data: {"product":product},
	    	success:function(data){
	    		num = data;
	    	}
	    });
		return num;
	}
	 
	//根据产品统计
	function selectNum() {
    	var position = "膜丝";
    	var product = $("#product").html();
    	var format = $.trim($("#planTime").text());
    	var chanxian = $.trim($("#Chanxian").text());
    	var cxNum = $.trim($("#cxNum").html());
    	//计划量
    	$.ajax({
	    	type:'post',
	    	async:false, 
	    	url:'${pageContext.request.contextPath }/shedu/selectByDate2.do',
	    	data: {"product":product,"chanxian":chanxian,"format":format},
	    	success:function(data){
	    		var num = selectnumByProduct(product);
	    		$("#planNum").html(data * num);
	    	}
	    });
    	//日产量
	    $.ajax({
	    	type:'post',
	    	async:false, 
	    	url:'${pageContext.request.contextPath }/mousseBundleSample/selectNumByDateAndProduct.do',
	    	data: {"product":product,"cxNum":cxNum},
	    	success:function(data){
	    		$("#realityNum").html(data);
	    	}
	    })
	    //年产量
	    $.ajax({
	    	type:'post',
	    	async:false, 
	    	url:'${pageContext.request.contextPath }/mousseBundleSample/selectNumByYearAndProduct.do',
	    	data: {"product":product,"cxNum":cxNum},
	    	success:function(data){
	    		$("#yearNum").html(data);
	    	}
	    })
	}
		
		
	//根据膜丝编号给膜丝类型和产品赋值
	function selectByCode(m) {
		//根据膜丝编号给产线赋值
		selectChanxianByCode(m)
		//根据扫码编号查类型编号（01....）/（0960........）
		var typeArr = selectTypeByCode(m);
		m = typeArr[1];
		//根据膜丝（01....），产品，膜丝类型、组件尺寸对应关系数组给产品，膜丝类型赋值
		for (var i = 0; i < productArr.length; i++) {
			var arr = productArr[i]
			if(m == arr[0]){
				$("#product").html(arr[1])
				$("#Mtype").html(arr[2])
				//根据产品统计
				selectNum();
			}
		}
	}
	
	//根据膜丝编号给产线赋值
	function selectChanxianByCode(m) {
		var cx = m.substring(4,6)
		$("#cxNum").html(cx)
		//年产量
	    $.ajax({
	    	type:'post',
	    	async:false, 
	    	url:'${pageContext.request.contextPath }/lineMana/getProductionLineByNumber.do',
	    	data: {"lineNumber":cx},
	    	dataType: 'JSON',
	    	success:function(data1){
	    		var data = data1.data;
	    		if(data.length == 1){
					$("#Chanxian").html(data[0].lineName)
	            }
	    	}
	    });
	}
	
	//根据扫码编号查类型编号（01....）/（0960........）
	function selectTypeByCode(m) {
		// 膜丝/膜管（0：膜丝 ；1：膜管）  类型
		var type = new Array();
		if(m.length == 12 && m.substring(1,2) == "M"){
			type.push(0);
			type.push(m.substring(2,4));
		}else if(m.length == 16 && m.substring(1,3) == "PS"){
			type.push(1);
			type.push(m.substring(3,5));
		}
		return type;
	}
	//扫码成功操作(id,条码,赋值id号)
	function successfulScanCode(valueNumber){ 
		assignId = currentId+1
		if(assignId <= firstId){
			//清除所有数据
			for (var i = firstId; i <= lastId; i++) {
				$("#"+mmNumber+i).html("");
		 	}
		}
		if(assignId >= lastId){
			currentId = firstId-1;
		}else{
			currentId++;
		}
		//把查到的膜丝编号保存
		$("#"+mmNumber+assignId).html(valueNumber)
	}
	//按键事件
	document.onkeydown=keyDown;
	function keyDown(e){  
	    //IE内核浏览器  
	     if (navigator.appName == 'Microsoft Internet Explorer'){  
	           var keycode = event.keyCode;  
	           var realkey = String.fromCharCode(event.keyCode);  
	     }else {//非IE内核浏览器  
	           var keycode = e.which;  
	           var realkey = String.fromCharCode(e.which);  
	     }  
	   // console.log('按键码:' + keycode +  '字符: ' + realkey);  

	   //监听Ctrl键  
	   if(keycode==13){ 
		   if($("#icode").val() != null && $("#icode").val() != "" && $("#icode").val() != undefined) {
			   var icode =  $("#icode").val();
				$("#icode").val(icode+",");
			   return;
		   }
		   //获取到前聚焦的input框id
		   var idz=$("input:focus").attr("id"); 
		   if(idz != null && idz != "" && idz != undefined){
			   //聚焦在扫码框
			   if(barCodeId == idz){
				    tz(barCodeId);
			        //$("#"+barCodeId).val("");  
			        $("#"+barCodeId).focus();  
			        $("#"+barCodeId).select();  
			   //聚焦在膜丝捆框
			   }else if(i1 == idz){
				   if(!tz1(i1)){
					   $("#"+idz).focus();  
				       $("#"+idz).select(); 
				   }
			   //聚焦在膜丝根框
			   }else if(i2 == idz){
				   if(!tz2(i2)){
					   $("#"+idz).focus();  
				       $("#"+idz).select(); 
				   }
			   }
		   }else{
		    	$("#"+barCodeId).focus();  
		        $("#"+barCodeId).select();
		    }
	   }  
	}
	
	//聚焦在扫码框
	function tz(id){ 
		var barCode = $("#"+id).val()
		if(barCode == "" || barCode == null){
			toastr.warning("不能为空！");
		}else{
			//膜丝/膜管（0：膜丝 ；1：膜管）  类型
			var typeArr = selectTypeByCode(barCode)
			if(typeArr.length > 0 && typeArr[0] == 0){
				//根据膜丝捆查id和状态
				var mbscode = bundleSelectByMbscode(barCode);
				if(mbscode.length < 1){
					//膜丝捆是否提交成功 true否false是
					if(bundleSave(barCode)){
						toastr.success("提交成功！");
						//扫码成功操作(id,条码,赋值id号)
						successfulScanCode(barCode)
						selectByCode(barCode);
					}else{
						toastr.warning("提交失败！");
					} 
				}else{
					toastr.warning("已经有重复的！");
				}
			}else{
				toastr.warning("请扫码正确的膜丝编号！");
			}
		}
	}
	//聚焦在膜丝捆框
	function tz1(id){ 
		var flg = false;
		var barCode = $("#"+id).val()
		if(barCode == "" || barCode == null){
			toastr.warning("不能为空！");
		}else{
			//膜丝/膜管（0：膜丝 ；1：膜管）  类型
			var typeArr = selectTypeByCode(barCode)
			if(typeArr.length > 0 && typeArr[0] == 0){
				//根据膜丝捆查id和状态
				var mbscode = bundleSelectByMbscode(barCode);
				if(mbscode.length >= 1){
					if(mbscode[1] == "留样"){
						toastr.warning("该膜丝已留样")
					}else if(mbscode[1] == "膜丝绑定"){
						toastr.warning("该膜丝已膜丝绑定")
					}else{
						//膜丝捆是否有重复 true否false是
						if(!MousseSelectByMscode(mbscode[0],"mbcode")){
							toastr.warning("已经有重复的！");
						}else{
							$("#i1Id").val(mbscode[0])
							$("#"+i2).select(); 
							flg = true;
						}
					}
				}else{
					toastr.warning("该膜丝不存在！");
				}
			}else{
				toastr.warning("请扫码正确的膜丝编号！");
			}
		}
		return flg;
	}
		
	//膜丝根是否有重复 true否false是
	function MousseSelectByMscode(value,name){ 
		var flg = true;
		$.ajax({
	        type:'post',
	        url:'${pageContext.request.contextPath }/mousseSample/selectmousseSampleByExample.do',
	        data: name+"=" + value,
	        dataType: 'JSON',
	        async:false, 
	        success:function(data){
	            if(data.length == 0){
	            	flg = true;
	            }else{
	                flg = false;
	            }
	        }

	    })
	    return flg;
	}

	//聚焦在膜丝根框
	function tz2(id){ 
		var flg = false;
		var barCode = $("#"+id).val()
		if(barCode == "" || barCode == null){
			toastr.warning("不能为空！");
		}else{
			if(!MousseSelectByMscode(barCode,"mscode")){
				toastr.warning("已经有重复的！");
			}else{
				//膜丝捆是否提交成功 true否false是
				if(MousseSave(id)){
					toastr.success("绑定成功！");
					layer.closeAll();
					flg = true;
				}else{
					toastr.warning("绑定失败！");
				} 
			}
		}
		return flg;
	}
	
	//膜丝绑定是否提交成功 true否false是
	function MousseSave(id){ 
		var flg = true;
		//var h1 = $("#i1").val()
		var h1 = $("#i1Id").val()
		var h = $("#"+id).val()
		$.ajax({
	        type:'post',
	        url:'${pageContext.request.contextPath }/mousseSample/insertmousseSample.do',
	        data:{"mbcode":h1,"mscode":h},
	        dataType: 'JSON',
	        async:false, 
	        success:function(data){
	            if(data != 0){
	            	flg = true;
	            }else{
	                flg = false;
	            }
	        }

	    })
	    return flg;
	}
	
	//根据膜丝捆查id和状态
	function bundleSelectByMbscode(value){
		var mbscode = new Array();
		$.ajax({
	        type:'post',
	        url:'${pageContext.request.contextPath }/mousseBundleSample/selectmousseBundleSampleByExample.do',
	        data:{"mbscode":value},
	        dataType: 'JSON',
	        async:false, 
	        success:function(data){
	            if(data.length == 1){
	            	mbscode.push(data[0].mbsid);
	            	mbscode.push(data[0].mbsremark);
	            }
	        }

	    })
	    return mbscode;
	}
	
	//膜丝捆是否提交成功 true否false是
	function bundleSave(barCode){ 
		var plan = $("#planTime").html();
		var flg = true;
		$.ajax({
	        type:'post',
	        url:'${pageContext.request.contextPath }/mousseBundleSample/insertmousseBundleSample.do',
	        data:{"mbscode":barCode,"mbsplan":plan},
	        dataType: 'JSON',
	        async:false, 
	        success:function(data){
	            if(data != 0){
	            	flg = true;
	            	//selectNum();
	            }else{
	                flg = false;
	            }
	        }

	    })
	    return flg;
	}
</script>
<body>
   
   <table id="table1" style="width: 100%; text-align: center;" border="1px solid #000">
   		<tr>
   			<td rowspan="2" width="30%">
   				<img alt="" src="${pageContext.request.contextPath }/img/logo.png" width="60%">
   			</td>
   			<td rowspan="2" width="30%" class="headTd">
   				<p class="font1">膜丝工位</p>
   			</td>
   			<td colspan="2" width="20%" class="headTd">
   				<p class="font2">操作人</p>
   			</td>
   			<td rowspan="2" colspan="2" width="20%" class="headTd">
   				<a id="myTime"  class="font2"></a>
   				<a id="time1" class="font2"></a>
   			</td>
   		</tr>
   		<tr>
   			<td colspan="2"  class="font2 headTd" id="people"><%=name%></td>
   		</tr>
   		
   		<tr>
   			<td rowspan="2" class="font3 titleTd">排产单号</td>
   			<td rowspan="2" class="font3 titleTd">当前产线/产品</td>
   			<td colspan="4"  class="font4 titleTd" style="font-size: 30px;">膜丝编码</td>
   		</tr>
   		<!-- <tr>
   			<td colspan="4" class="font3" >
   				<input type="text" width="100%" placeholder="扫码输入框">
   			</td>
   		</tr> -->
   		<tr>
   			<td colspan="4" class="font4" style="font-size: 30px;">
   				<input id="barCode" placeholder="扫码输入框" style="width: 99%;border:1px #FFFFFF solid;text-align: center;">
   			</td>
   		</tr>
   		<tr>
   			<td class="font3" id="planTime"></td>
   			<td class="font3">
   					<span id="cxNum" style="display:none"></span>
   					<span id="Chanxian"></span>/<span id="product"></span></td>
   			<td colspan="4" rowspan="15" class="font3">
   				<table id="showTable" style="width: 100%;">
   					<tr>
   						<td style="width: 10px;">
   							<span>01</span>
   						</td>
   						<td>
   							<span id="m1"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>02</span>
   						</td>
   						<td>
   							<span id="m2"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>03</span>
   						</td>
   						<td>
   							<span id="m3"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>04</span>
   						</td>
   						<td>
   							<span id="m4"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>05</span>
   						</td>
   						<td>
   							<span id="m5"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>06</span>
   						</td>
   						<td>
   							<span id="m6"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>07</span>
   						</td>
   						<td>
   							<span id="m7"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>08</span>
   						</td>
   						<td>
   							<span id="m8"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>09</span>
   						</td>
   						<td>
   							<span id="m9"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>10</span>
   						</td>
   						<td>
   							<span id="m10"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>11</span>
   						</td>
   						<td>
   							<span id="m11"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>12</span>
   						</td>
   						<td>
   							<span id="m12"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>13</span>
   						</td>
   						<td>
   							<span id="m13"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>14</span>
   						</td>
   						<td>
   							<span id="m14"></span>
   						</td>
   					</tr>
   					<tr>
   						<td>
   							<span>15</span>
   						</td>
   						<td>
   							<span id="m15"></span>
   						</td>
   					</tr>
   				</table>
			</td>
   		</tr>
   		<tr>
   			<td class="font3 titleTd">
   				计划数量
   			</td>
   			<td class="font3 titleTd">
   				膜丝类型
   			</td>
   		</tr> 
   		<tr>
   			<td class="font3" id="planNum">&nbsp;</td>
   			<td class="font3" id="Mtype"></td>
   		</tr> 
   		<tr>
   			<td class="font3 titleTd">
   				完成数量
   			</td>
   			<td class="font3 titleTd">
   				当前年生产量
   			</td>
   		</tr> 
   		<tr>
   			<td class="font3" id="realityNum"></td>
   			<td class="font3" id="yearNum">&nbsp;</td>
   		</tr> 
   		<tr>
   			<td colspan="2" class="font3">
	 			<button style="background-color: #4472C4;font-family: 微软雅黑; color: #ffffff;width: 20%;" data-method="over" data-type="auto" id="click_event1">膜丝绑定</button>
				&emsp;
				<button style="background-color: #4472C4;font-family: 微软雅黑; color: #ffffff;width: 20%;" data-method="baoXui" data-type="auto" id="repair">设备报修</button>
				&emsp;
				<button style="background-color: #4472C4;font-family: 微软雅黑; color: #ffffff;width: 20%;" data-method="offset" data-type="auto" id="bad">配件报检</button>
   			</td>
   		</tr>
   		<tr>
   			<td class="font3" id="gongyika" style="background-color: #4472C4;font-family: 微软雅黑; color: #ffffff;border-width: 8px; border-color: #ffffff">工艺卡</td>
   			<td class="font3" id="zuoye" style="background-color: #4472C4;font-family: 微软雅黑; color: #ffffff;border-width: 8px; border-color: #ffffff">作业管理</td>
   		</tr>
   		<tr>
   			<td colspan="2" class="font3" id="back" style="background-color: #676767;font-family: 微软雅黑; color: #ffffff;border-width: 8px; border-color: #ffffff">注销</td>
   		</tr>
   </table>
   <!-- ----------------------------点击按钮事件------------------------------ -->
	<!-- 膜丝绑定扫码弹框 -->
	<div id="msDivID" hidden="hidden">
		<form class="layui-form layui-card-body" id="msFormID">
			<div class="layui-form-item" style="margin-top:25px">
				<label class="layui-form-label left-label">膜丝（捆）</label>
				<input class="layui-input" id="i1" style="width:300px;"><br>
				<input type="hidden" id="i1Id" >
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label left-label">膜丝（根）</label>
				<input class="layui-input" id="i2" style="width:300px;"><br>
			</div>
		</form>
	</div>
	<!-- 配件列表 -->
	<div id="peiDivID" hidden="hidden">
   
	   	<div class="demoTable" style="padding:10px 0 0 15px">
			<label class="layui-form-label">配件名称</label>
		    <div class="layui-inline">
		    	<input class="layui-input" name="searchName" id="searchName" placeholder="" style="display: inline; width: 80%">
		    </div>
		    <button class="layui-btn layui-btn-blue" style="margin: 0 0 0 10px" data-type="reload" id="serch"><i class="layui-icon layui-icon-search">  搜索</i></button>
		</div>
		<table class="layui-hide" id="peiList" lay-filter="peiList"></table>
	</div>
	
	<!-- 配件报检 -->
	
	 <div id="ngDivID" hidden="hidden">
	<form class="layui-form layui-card-body" id="formID" action="${pageContext.request.contextPath}/ng/insert.do">
	  	<input type="hidden" name="istation" value="膜丝">
	  	<div class="layui-form-item">
			<label class="layui-form-label">条码</label>
			<input class="layui-input" lay-verify="type" type="text" name="icode" id="icode" style="width:200px;">
		</div>
   		<div class="layui-form-item">
   			<div class="layui-inline">
				<label class="layui-form-label">配件名称</label>
				 <div class="layui-input-inline">
					<input class="layui-input" type="text" name="iname" id="iname" lay-verify="iname" style="width:200px;" onclick="pei()">
				</div>
			</div>
			<div class="layui-inline">
				<font style="color:red; font-size: 24px;">*</font>
		    </div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">配件规格</label>
			<div class="layui-input-block">
 				<input class="layui-input"  lay-verify="type" type="text" name="istandard" id="istandard" style="width:200px;">
 			</div>
		</div>
		<div class="layui-form-item"><label class="layui-form-label">配件批次号</label><input class="layui-input" lay-verify="type" type="text" name="ibatch" id="ibatch" style="width:200px;"></div>
		<div class="layui-form-item"><label class="layui-form-label">配件数量</label><input class="layui-input" lay-verify="type" type="text" name="inum" id="inum" style="width:200px;"></div>
  		<div class="layui-form-item">
  			<label class="layui-form-label">异常描述</label>
  			<div class="layui-input-inline" style="width:200px;">
                <input type="text" name="idescription" id="idescription" class="layui-input" style="position:absolute;z-index:2;width:80%;" lay-verify="idescription" onkeyup="search()" autocomplete="off">
		      	<select type="text" id="hc_select"  lay-filter="hc_select" autocomplete="off" class="layui-select" lay-search>
		      	</select>
  			</div>
  			<div class="layui-inline">
				<font style="color:red; font-size: 24px;">*</font>
		    </div>
  		</div>
  		
  		 <div class="layui-form-item">
		    <label class="layui-form-label">是否推送</label>
		    <div class="layui-input-block">
		      <input type="checkbox" name="remark01" lay-skin="switch" lay-text="ON|OFF">
		    </div>
		  </div>
  		
  		<button class="layui-btn layui-btn-blue" lay-submit lay-filter="subform" id="save" style="margin-left:120px; margin-bottom: 20px">提交</button>&emsp;&emsp;&emsp;&emsp;<button type="reset" id="cz" class="layui-btn layui-btn-primary" style="margin-bottom: 20px">重置</button>
	</form>
</div>
	<script type="text/html" id="rowToolbar">
		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="back">带回</a>
	</script>
	<script type="text/javascript">
		var index;
		function pei() {
			$("#searchName").val("");
			$("#serch").click();
			index = layer.open({
				type: 1 					//Page层类型
		  		,area: ['750px', '600px'] 	//宽  高
		  		,title: '选择配件'
		  		,shade: 0.6 				//遮罩透明度
		  		,maxmin: true 				//允许全屏最小化
		  		,anim: 1 					//0-6的动画形式，-1不开启
		  		,content: $("#peiDivID")
		  		,end: function(){
		  			$("#peiDivID").hide();
		  		} 
			});
		}
	</script>
	
	<script type="text/javascript">
		//点击"+"和"-"效果
	    $(function(){
	        var index;
	        /* $("#add").click(function(){ */
	        $("body").on("click", "#add", function() {
	            //console.log($(this).parents('tr').get(0));
	            var rowId = $(this).parents('tr').attr("id");
	            //alert(rowId);
	            var tbody = document.getElementById("tbody");
	            index = tbody.rows.length + 1;
	            var tab = document.getElementById('myTable');
	            //指定行号
	            var rowNumNext = document.getElementById(rowId).rowIndex + 1;
	            //在指定行下插入一行
	            var tr = tab.insertRow(rowNumNext);
	            //给tr设置动态Id和样式
	            tr.id = "tr" + index;
	            tr.style = "text-align: center";
	            //在行下插入列内容
	            var cell0 = tr.insertCell(0);
	            var cell1 = tr.insertCell(1);
	            var cell2 = tr.insertCell(2);
	            var cell3 = tr.insertCell(3);
	            var cell4 = tr.insertCell(4);
	
	            cell0.innerHTML = '<td><input class="layui-input" id="changeDeviceName" name="changeDeviceName" type="text" style="width:122px; margin-left: 27px; margin-bottom: 15px"></td>';
	            cell1.innerHTML = '<td><input class="layui-input" id="deviceVersion" name="deviceVersion" type="text" style="width:122px; margin-left: 27px; margin-bottom: 15px"></td>';
	            cell2.innerHTML = '<td><input class="layui-input" id="deviceCount" name="deviceCount" type="text" style="width:122px; margin-left: 27px; margin-bottom: 15px"></td>';
	            cell3.innerHTML = '<td><input class="layui-input" id="deviceUnit" name="deviceUnit" type="text" style="width:122px; margin-left: 27px; margin-bottom: 15px"></td>';
	            cell4.innerHTML = '<td><i class="layui-icon layui-icon-add-1" id="add" style="font-size: 15px; color: #1E9FFF;"></i><br><i class="layui-icon layui-icon-close" id="recover" style="font-size: 15px; color: #1E9FFF; font-weight: bold;"></i></td>';
	        });
	
	        $("body").on("click", "#recover", function() {
	            var rowId = $(this).parents('tr').attr("id");
	            $("#"+rowId).remove();
	        })
	    });
	
		layui.use(['table','layer','upload','form','laydate'], function(){
			  var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
			  var table = layui.table;
			  var layer = layui.layer;
			  var laydate = layui.laydate;
			  var form = layui.form; 
			  form.render();
			  
			  form.on('select(hc_select)', function (data) {   //选择移交单位 赋值给input框
		          $("#idescription").val(data.value);
		          $("#hc_select").next().find("dl").css({ "display": "none" });
		          form.render();
		      });

		      window.search = function () {
		          var value = $("#idescription").val();
		          $("#hc_select").val(value);
		          form.render();
		          $("#hc_select").next().find("dl").css({ "display": "block" });
		          var dl = $("#hc_select").next().find("dl").children();
		          var j = -1;
		          for (var i = 0; i < dl.length; i++) {
		              if (dl[i].innerHTML.indexOf(value) <= -1) {
		                  dl[i].style.display = "none";
		                  j++;
		              }
		              if (j == dl.length-1) {
		                  $("#hc_select").next().find("dl").css({ "display": "none" });
		              }
		          }
		          
		      }

			  
			  
		  	  var $ = layui.jquery, active = {
						reload:function () {
							var searchName = $("#searchName").val();
							table.reload('contenttable2',{
								method:'get',
								where:{"paname":searchName},
								page:{
									curr:1  //重新从第一页开始
								}
							});
						}
					  }
			  
			  $('.layui-btn').on('click', function(){
			      var type = $(this).data('type');
			      active[type] ? active[type].call(this) : '';
			  });
		  	  
		  	$.ajax({
		        type: "post",
		        url: "${pageContext.request.contextPath }/json/options.json",
		        dataType: 'JSON',
		        success: function (data) {
		              //设置下拉列表中的值的属性
		       		 $("#hc_select").append('<option value="">请选择</option>'); 
		              for ( var i = 0; i < data.length; i++) {
		            	  //增加下拉列表。
		            	  $("#hc_select").append("<option>"+data[i].name+"</option>");
		            	  form.render('select');
		              }
		        }
		  	});

			  table.render({
				    elem: '#peiList'
				    ,url:'${pageContext.request.contextPath }/partMana/listPagePart.do'
				    ,title: '配件列表'
				    ,id :'contenttable2'
				    ,limits:[10,20,30]
				    ,cols: [[
						      {field:'paname', title:'配件名称',width:200},
						      {field:'panum', title:'配件编号' ,width:150},
						      {field:'pamodel', title:'配件规格',width:200},
						      {field:'paremark1', title:'计量单位',width:100},
						      //{field:'paremark2', title:'包装规格',width:100},
						      {fixed:'right', title:'操作', toolbar: '#rowToolbar', width:80}
						    ]],
				    page: true,
			  });
					  
			  table.on('tool(peiList)', function(obj){
					var data = obj.data;
					console.log(obj)
					if(obj.event === 'back'){
						
					    $("#iname").val(obj.data.paname); 
					    $("#istandard").val(obj.data.pamodel); 
					    var id = obj.data.paid;
					    $.ajax({
					    	type:'post',
					    	data: {"id":id},
					    	url:'/solid/selectPcByPaid.do',
					    	success:function(data){
					    		$("#ibatch").val(data); 
					    	}
					    });
					    if($("#iname").val() != null ) {
					    	layer.close(index); 
					    }
					    
					}
			  });
		  
			 //下拉框查找所有部门
			 $.ajax({
			   type: 'POST',
			   url: '${pageContext.request.contextPath}/device/queryAllDeptList.do',
			   dataType: 'json',
			   async: false,
			   success: function (data){
			       for (var i = 0; i < data.length; i++) {
			           $("#repairDept").append("<option value='"+ data[i].name +"'>"+ data[i].name +"</option>");
			       }
			   }
			});
			//初始化radio、select等元素
			form.render();
		  
		   //设备报修
		   $('#repair').click(function(){   
			   layer.open({
			         type: 1 					//Page层类型
			         ,area: ['50%', '83%'] 	//宽  高
			         ,title: '设备报修'
			         ,shade: 0.6 				//遮罩透明度
			         ,maxmin: true 				//允许全屏最小化
			         ,anim: 1 					//0-6的动画形式，-1不开启
			         //,content: $("#addFormID")
			         ,content: '<form class="layui-form" id="addFormID">'+
			         '<table>'+
			         '<tr>'+
			             '<td><label class="layui-form-label left-label" style="margin-top: 20px;width:150px;" >设备编号</label></td>'+
			             '<td>'+
			                 '<div>'+
			                     '<div style="width: 200px; margin-left: 0px; float: left; margin-top: 20px">'+
			                         '<select class="layui-select" id="deviceNo" name="deviceNo" lay-filter="displayInfo" lay-verify="deviceNo">'+
			                             '<option value="">请选择</option>'+
			                         '</select>'+
			                     '</div>'+
			                     '<div style="margin-top: 29px; float: left">'+
			                         '<font style="color:red; font-size: 24px; margin-left: 4px">*</font>'+
			                     '</div>'+
			                 '</div>'+
			             '</td>'+ 					
			             '<td><label class="layui-form-label left-label" style="margin-top: 20px;width:150px;">故障设备名称</label></td>'+
			             '<td><input type="text" id="deviceName" name="deviceName" lay-verify="deviceName" class="layui-input" style="width:200px; margin-top: 20px; display: inline;">' +
			                 '<div class="layui-inline" style="margin-top: 4px;">'+
			                     '<font style="color:red; font-size: 24px; margin-left: 4px">*</font>'+
			                 '</div>'+
			             '</td>'+
			         '</tr>'+
			         '<tr style="height:10px"></tr>'+
			         '<tr>'+
			             '<td><label class="layui-form-label left-label" style="width:150px;">报修部门/车间</label></td>'+
			             '<td>'+
			                 '<div>'+
			                     '<div style="width: 200px; margin-left: 0px; float: left">'+
			                         '<select class="layui-select" id="repairDept" name="repairDept" lay-verify="repairDept">'+
			                             '<option value="">请选择</option>'+
			                         '</select>'+
			                     '</div>'+
			                     '<div style="margin-top: 9px; float: left">'+
			                         '<font style="color:red; font-size: 24px; margin-left: 4px">*</font>'+
			                     '</div>'+
			                 '</div>'+
			             '</td>'+
			             '<td><label class="layui-form-label left-label" style="width:150px;">报修人</label></td>'+
			             '<td><input type="text" name="repairMan" id="repairMan" value="<%= name%>" class="layui-input" style="width:200px"></td>'+
			         '</tr>'+
			         '<tr style="height:10px"></tr>'+
			         '<tr>'+
			             '<td><label class="layui-form-label left-label"  style="width:150px;">报修时间</label></td>'+
			             '<td><input type="text" name="repairTime" id="repairTime"  class="layui-input" style="width:200px"></td>'+
			             '<td></td>'+
			             '<td></td>'+
			         '</tr>'+
			         '<tr style="height:10px"></tr>'+
			         '<tr>'+
			             '<td><label class="layui-form-label left-label" style="width:150px;">故障现象描述</label></td>'+
			             '<td colspan="3"><textarea class="layui-textarea" id="errorDescribe" name="errorDescribe" style="width: 540px; height: 150px;"></textarea></td>'+
			         '</tr>'+
			         '<tr style="height:10px"></tr>'+
			         '<tr>'+
			             '<td colspan="2">' +
			                 '<label class="layui-form-label" style="width:150px;">审批人</label>' +
			                 '<input readonly class="layui-input" lay-verify="approvalPeople" placeholder="请选择审批人" name="approvalPeople" id="approvalPeople" type="text" style="width:100px; display:inline; margin-left: 19px">' +
			                 '<i style="font-size:15px;" id="refresh" class="layui-icon layui-icon-refresh"></i>' +
			                 '<ul id="treeConfig" class="ztree" style="margin-left: 120px;"></ul>'+
			             '</td>'+
			             '<td colspan="2">' +
			                 '<label class="layui-form-label" style="width:150px;">抄送人</label>' +
			                 '<input readonly class="layui-input" lay-verify="ccPeople" placeholder="请选择三个抄送人" name ="ccPeople" id="ccPeople" type="text" style="width:200px; display:inline">' +
			                 '<i style="font-size: 15px;" id="dCopyMenRefresh" class="layui-icon layui-icon-refresh"></i>'+
			                 '<ul id="dCopyMenConfig" class="ztree" style="margin-left: 100px;"></ul>'+
			             '</td>'+
			         '</tr>'+
			         '<tr style="height:20px"></tr>'+
			         '<tr align="center">'+
			             '<td colspan="2"><button class="layui-btn layui-btn-blue" id="subBtn" lay-submit lay-filter="addForm" style="margin-left:160px; margin-bottom: 20px">提交</button>&emsp;&emsp;'+
			             '<td colspan="2"><button type="reset" class="layui-btn layui-btn-primary" style="margin-bottom: 20px">重置</button>'+
			         '<tr>'+
			     '</table>'+
			 '</form>'
			     
						,success: function(){
						 
						 var people = $("#people").text();
							$("#repairMan").val(people);
						 
						 //报修时间
						 laydate.render({
						     elem: '#repairTime'
						 });
							//维修起始时间
						 laydate.render({
						     elem: '#fixStartTime'
						 });
						 //维修结束时间
						 laydate.render({
						     elem: '#fixEndTime'
						 });
						 //验收日期
						 laydate.render({
						     elem: '#acceptTime'
						 });
							//下拉查找所有设备
						 $.ajax({
						          type: 'POST',
						          url: '${pageContext.request.contextPath}/device/queryAllDeviceList.do',
						          dataType: 'json',
						          async: false,
						          success: function (data){
						              for (var i = 0; i < data.length; i++) {
						                  $("#deviceNo").append("<option value='"+ data[i].deviceNo +"'>"+ data[i].deviceNo +"</option>");
						              }
						          }
						      });
							//下拉框查找所有部门
							$.ajax({
						        type: 'POST',
						        url: '${pageContext.request.contextPath}/device/queryAllDeptList.do',
						        dataType: 'json',
						        async: false,
						        success: function (data){
						            for (var i = 0; i < data.length; i++) {
						                $("#repairDept").append("<option value='"+ data[i].name +"'>"+ data[i].name +"</option>");
						            }
						        }
						    });
							
							
							 $("#refresh").click(function(){
						            $("#approvalPeople").val("");
						        })
						        $("#dCopyMenRefresh").click(function(){
						            $("#ccPeople").val("");
						        })
						
						        var setting = {
						            isSimpleData : true,             //数据是否采用简单 Array 格式，默认false
						            treeNodeKey : "id",              //在isSimpleData格式下，当前节点id属性
						            treeNodeParentKey : "pId",       //在isSimpleData格式下，当前节点的父节点id属性
						            showLine : true,                 //是否显示节点间的连线
						            checkable : true,                //每个节点上是否显示 CheckBox
						            data: {
						                simpleData: {
						                    enable: true,
						                    idKey: "id",
						                    pIdKey: "pId",
						                    rootPid: "0"
						                }
						            },
						            callback: {
						                onDblClick: onDblClick,
						            }
						        };
						
						        var dCopyMenSetting = {
						            isSimpleData : true,              //数据是否采用简单 Array 格式，默认false
						            treeNodeKey : "id",               //在isSimpleData格式下，当前节点id属性
						            treeNodeParentKey : "pId",        //在isSimpleData格式下，当前节点的父节点id属性
						            showLine : false,                 //是否显示节点间的连线
						            data: {
						                simpleData: {
						                    enable: true,
						                    idKey: "id",
						                    pIdKey: "pId",
						                    rootPid: "0"
						                }
						            },
						            callback: {
						                onDblClick: dCopyMenOnDblClick,
						            }
						        };
						
						        function onDblClick(e,treeId,treeNode) {
						
						            selectedNode = treeNode;
						            var name = treeNode.name;
						            var id = treeNode.id;
						            var type = treeNode.type;
						            if(type!="-1"){
						                var dApprover1 = $("#approvalPeople").val();
						                var dApprovers = dApprover1.split(",");
						                for(var i=0;i<dApprovers.length;i++){
						                    if(name==dApprovers[i]){
						                        toastrStyle();
						                        toastr.warning("选择了重复的审批人！")
						                        name = "";
						                    }
						                }
						                var dApprover2;
						                if(dApprover1 == "" && name != ""){
						                    dApprover2 = $("#approvalPeople").val((dApprover1+','+name).substring(1));
						                }else if(name != ""){
						                    dApprover2 = $("#approvalPeople").val(dApprover1+','+name);
						                }
						                var dApprover3 =  $("#approvalPeople").val();
						                var dApprovers3 = dApprover3.split(",");
						                var dApprovers3Length = dApprovers3.length;
						                if(dApprovers3Length>1){
						                    toastr.warning("最多选择1个审批人");
						                    $("#approvalPeople").val(dApprover1);
						                }
						            }else{
						                toastrStyle();
						                toastr.warning("请选择审批人！")
						            }
						        }
						
						        function dCopyMenOnDblClick(e,treeId,treeNode) {
						            dCopyMenSelectedNode = treeNode;
						            var name = treeNode.name;
						            var id = treeNode.id;
						            var type = treeNode.type;
						
						            var dCopyMen = $("#ccPeople").val();
						            var dCopyMen = dCopyMen.split(",");
						            for(var i=0;i<dCopyMen.length;i++){
						                if(name==dCopyMen[i]){
						                    toastrStyle();
						                    toastr.warning("选择了重复的抄送人！")
						                    name = "";
						                }
						            }
						            if(dCopyMen == "" && name != ""){
						                dCopyMen = $("#ccPeople").val((dCopyMen+','+name).substring(1));
						            }else if(name != ""){
						                dCopyMen = $("#ccPeople").val(dCopyMen+','+name);
						            }
						        }
						
						        $.ajax({
						            type:'get',
						            url:'${pageContext.request.contextPath }/disposeRejects/getZtreeJson.do',
						            dataType:'json',
						            success: function(data){
						                var	zNodes = data.rows;
						                $(document).ready(function() {
						                    $.fn.zTree.init($("#treeConfig"), setting, zNodes);
						                });
						            },
						            error: function(){
						                toastrStyle();
						                toastr.error("请求失败");
						            }
						        });
						
						        $.ajax({
						            type:'get',
						            url:'${pageContext.request.contextPath }/disposeRejects/getZtreeJson.do',
						            dataType:'json',
						            success: function(data){
						                var	dCopyMenzNodes = data.rows;
						                $(document).ready(function() {
						                    $.fn.zTree.init($("#dCopyMenConfig"), dCopyMenSetting, dCopyMenzNodes);
						                });
						            },
						            error: function(){
						                toastrStyle();
						                toastr.error("请求失败");
						            }
						        });
							
						 //初始化radio、select等元素
						 form.render();
						}
					});
				})
		   
		    //配件报检
		 $('#bad').click(function(){   
			 layer.open({
			   type: 1 					//Page层类型
		  		,area: ['500px', '650px'] 	//宽  高
		  		,title: '配件报检'
		  		,shade: 0.6 				//遮罩透明度
		  		,maxmin: true 				//允许全屏最小化
		  		,anim: 1 					//0-6的动画形式，-1不开启
		  		,content: $("#ngDivID")
		  		,end: function(){
		  			$("#ngDivID").hide();
		  			
		  			$("#barCode").select(); 
		  			
		  		}
		   		,success: function(layero, index){
		   			$("#cz").click();
		   			form.render();
		   			
		   			$("#icode").focus(); 

		   			
		        this.enterEsc = function(event){
		          if(event.keyCode === 13){
		            return false; //阻止系统默认回车事件
		          }
		        }; 
		        $(document).on('keydown', this.enterEsc);	//监听键盘事件，关闭层
		    }
		   });
		  })
		  
		    //注销
		  $('#back').click(function(){   
			  window.location.href="${pageContext.request.contextPath }/logout.do";
		   });
		  
		  $('#click_event1').click(function(){   
				layer.open({
					type: 1 					//Page层类型
			  		,area: ['500px', '300px'] 	//宽  高
			  		,title: '膜丝绑定'
			  		,shade: 0.1 				//遮罩透明度
			  		,maxmin: true 				//允许全屏最小化
			  		,anim: 1 					//0-6的动画形式，-1不开启
			  		,content: $("#msDivID")
			  		,end: function(){
			  			$("#msDivID").hide();
			  			$("#barCode").select(); 
			  		}
				    ,success: function(layero, index){
				        this.enterEsc = function(event){
				          if(event.keyCode === 13){
				            //layer.close(index);
				            return false; //阻止系统默认回车事件
				          }
				        }; 
				        $(document).on('keydown', this.enterEsc);	//监听键盘事件，关闭层
						//初始化
				        $('#msFormID')[0].reset();
				        //选择文本框
						$("#i1").select();
				    }
				}); 
		  })
		  
		  	//查找带回
		  form.on('select(displayInfo)', function(data){
		  	$.ajax({
		          type: 'POST',
		          url: '${pageContext.request.contextPath}/device/queryDeviceInfoByNo.do',
		          data: {deviceNo:$('#deviceNo').val()},
		          /* dataType: 'json', */
		          /* async: false, */
		          success: function (data){
		          	var device = eval('(' +data+ ')');
		          	$('#deviceName').val(device.deviceName);
		          }
		      });
		  });
		  
		  /**
		   * 通用表单提交(AJAX方式)(新增)
		   */
		  form.on('submit(addForm)', function (data) {
			  $("#subBtn").attr("disabled",true);
		      $.ajax({
		          url : '${pageContext.request.contextPath}/breakdown/addDeviceBreakdown.do',
		          data: $("#addFormID").serialize(),
		          cache : false,
		          type : "post",
		      }).done(
		          function(res) {
		              if (res > 0) {
		                  toastrStyle();
		                  toastr.success('报修成功！');
		                  setTimeout(function(){
		                	  layer.closeAll();
		                  },1000);
		              }
		          }
		      ).fail(
		          function(res) {
		              toastrStyle();
		              toastr.error('报修失败！');
		              setTimeout(function(){
		            	  layer.closeAll();
		              },1000);
		          }
		      )
		      return false;
		  });
		  
		  form.on('submit(subform)', function (data) {
			  
			  $("#save").attr("disabled",true);
			  
			  var datas=data.field;
		   	  var action=data.form.action;
		   	  $.ajax({
		   		  url:action,
		   		  data:datas,
		   		  type:"POST",
		   		  dataType:"json",
		   		  success:function(result){
		   			 if(result > 0) {
		   				toastr.success("报检成功！");
		   				$("#reset").click();
		   				layer.closeAll();
		   			 }else {
		   				 toastr.warning("报检失败！");
		   				 return false;
		   			 }
		   		  },
		   	  });
		   	  
		   	  return false;
			  });

		 
			toastr.options.positionClass = 'toast-top-center'; //提示框的位置设置为中上
			/**
		      * 新增表单校验
		      */
		     form.verify({
		         //value：表单的值item：表单的DOM对象
		         deviceName: function(value, item){
		             if(value == ''){
		                 return '设备名称不能为空';
		             }
		         },
		         deviceNo: function(value, item){
		             if(value == ''){
		                 return '设备编号不能为空';
		             }
		         },
		         repairDept: function(value, item){
		             if(value == ''){
		                 return '报修部门不能为空';
		             }
		         },
		         iname: function(value, item){
		             if(value == ''){
		                 return '配件名称不能为空';
		             }
		         },
		         idescription: function(value, item){
		             if(value == ''){
		                 return '异常描述不能为空';
		             }
		         },
		     });
		});
		//工艺卡
	  	$('#gongyika').click(function(){   
		 	 window.location.href="${pageContext.request.contextPath }/jumpPage/craftDetails.do";
	  	 });
		//作业管理
	  	$('#zuoye').click(function(){   
		 	 window.location.href="${pageContext.request.contextPath }/jumpPage/workManage.do?positionName=膜丝";
	  	 });
		//提示框样式
		function toastrStyle() {
		    toastr.options = {
		        "closeButton": false,
		        "debug": false,
		        "newestOnTop": false,
		        "progressBar": false,
		        "positionClass": "toast-top-center",
		        "preventDuplicates": false,
		        "onclick": null,
		        "showDuration": "5000",
		        "hideDuration": "1000",
		        "timeOut&quot": "100000",
		        "extendedTimeOut": "0",
		        "showEasing": "swing",
		        "hideEasing": "linear",
		        "showMethod": "fadeIn",
		        "hideMethod": "fadeOut"
		    };
		}
	</script>
	
</body>

</html>